how to create objects using constructors